package Publics;

import org.zhaijisong.pojo.Address;
import org.zhaijisong.pojo.DetailedAddress;

import java.util.List;

public class AddresMap {
    public static String getdizhi(DetailedAddress addr, Integer i){
        String str=null;
        if(addr==null){
            return str;
        }
        Address address=addr.getAddress();
        if(address!=null){
            List<Address> liadd=address.getThisAdd();
            str="";
            for(Address add:liadd){
                str+=add.getName();
                if(i>=3){
                    break;
                }
            }
            if(i<2){
                str+=address.getName();
            }
        }
        if(i<1){
            str+=addr.getAddressDeta();
        }
        return str;
    }
}
